Skip to content

Remove unused internals; a cancelled pooled all-columns read ends quietly - #284

Merged
electricessence merged 2 commits into
masterfrom
refactor/dead-code-pass3
Dec 2, 2026
Merged

electricessence merged 2 commits into
masterfrom
refactor/dead-code-pass3

Conversation

@electricessence

Copy link
Copy Markdown
Collaborator

Removes code nothing calls and tidies a few small things. No public API changes.

  • Removed: ListSink<T>; the ValueTask<bool> overload of CancelledAsFalse; the non-generic CancellationTokens.RunAsync; DbQueryBinding.MemberNames; the view-level WithConfig on MappedQuery<T>, MappedQueryWithSkip<T> and MappedQueryWithTake<T> (the core's and the command view's stay); the readStarted parameter of the private AsAsyncEnumerableInternal pair, which was always false; a no-op Contract.EndContractBlock() in an iterator; TextNameCache.Names (its two callers use the parser); the second copy of Bare in NameSet; the partial on DataRecordExtensions, which has no other part.
  • Tidied: the open-connection mask in ExpressiveCommandBase is !NeedsOpen, as everywhere else; an empty PooledBuffer is made by CreateEmptyOwner(); comments that described the code wrongly (the chunk shift is a bit shift, not doublings; the no-allocation note on CancellationTokens.RunAsync).
  • Fixed (the only behavior change): the pooled all-columns form of AsAsyncEnumerable(arrayPool) did not pass its token to ReadAsync or treat a cancelled read as the end, as the three other forms do. A read the provider cancels now ends the enumeration quietly with the rows already yielded. A test pins it, with the token reaching every read. It is in the release notes under "Changes since rc.16".

Left alone on purpose: FillAsync returns ValueTask<bool> that is always true; a plain ValueTask would need a conversion that allocates when the read does not finish at once. PooledBuffer.DisposeAsync keeps its async/await: a pool whose Return throws makes DisposeCore throw before it returns a task, and without the async that throw would come from the call instead of from the awaited result.

Core tests pass with the generator on and off, the samples pass, the Visual Studio solution build has no errors, dotnet format style and analyzers at --severity info report nothing on every project, and the docs build is clean.

🤖 Generated with Claude Code

electricessence and others added 2 commits December 1, 2026 13:07
…etly

Deletes code nothing calls, and tidies a few small things. No public API changes.

- Removed: `ListSink<T>`; the `ValueTask<bool>` overload of `CancelledAsFalse`; the non-generic `CancellationTokens.RunAsync`; `DbQueryBinding.MemberNames`; the view-level `WithConfig` on `MappedQuery<T>`, `MappedQueryWithSkip<T>` and `MappedQueryWithTake<T>` (the core's and the command view's stay); the `readStarted` parameter of the private `AsAsyncEnumerableInternal` pair, which was always `false`; a no-op `Contract.EndContractBlock()` in an iterator; `TextNameCache.Names` (its two callers use the parser); the second copy of `Bare` in `NameSet`; the `partial` on `DataRecordExtensions`, which has no other part.
- Tidied: the open-connection mask in `ExpressiveCommandBase` is `!NeedsOpen`, as everywhere else; an empty `PooledBuffer` is made by `CreateEmptyOwner()`; comments that described the code wrongly (the chunk shift is a bit shift, not doublings; the no-allocation note on `CancellationTokens.RunAsync`).
- Fixed: the pooled all-columns form of `AsAsyncEnumerable(arrayPool)` did not pass its token to `ReadAsync` or treat a cancelled read as the end, as the three other forms do. A read the provider cancels now ends the enumeration quietly with the rows already yielded. A test pins it, with the token reaching every read.
- Release notes: the cancel fix is under "Changes since rc.16".

Core tests pass with the generator on and off, the samples pass, the VS solution build has no errors, and `dotnet format style` and `analyzers` at `--severity info` report nothing on every project.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…pass3

# Conflicts:
#	docsite/articles/release-notes.md
@electricessence
electricessence merged commit 5b3f00f into master Dec 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant